package com.web.exiaodao.remote.vo;

import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

/**
 * @author eason.zt
 * @ClassName: ShopCarVo
 * @Description:商品-购物车 Vo
 * @date 2016-11-02 18:25:27
 */
@ApiModel(value = "商品-购物车Vo对象")
public class ShopCarVo {

    @ApiModelProperty(value = "主键，自动增长")
    private Long id;

    @ApiModelProperty(value = "商品的id,商品的id")
    private Long shopId;
    @ApiModelProperty(value = "购买数量,购物该商品数量")
    private Long carNumber;
    @ApiModelProperty(value = "用户id,购买用户的id")
    private Long userId;
    @ApiModelProperty(value = "价格,价格")
    private Double price;

    @ApiModelProperty(value = "商品信息,商品数量")
    private ShopVo shop;

    @ApiModelProperty(value = "选择的规格Ids,选择的规格Ids;用逗号分割")
    private String standardIds;
    @ApiModelProperty(value = "选择的规格(app接口有此值),选择的规格(app接口有此值)")
    private List<ShopStandardVo> selectStandard = new ArrayList<>();

    public ShopCarVo() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setCarNumber(Long carNumber) {
        this.carNumber = carNumber;
    }

    public Long getCarNumber() {
        return carNumber;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public ShopVo getShop() {
        return shop;
    }

    public void setShop(ShopVo shop) {
        this.shop = shop;
    }

    public List<ShopStandardVo> getSelectStandard() {
        return selectStandard;
    }

    public void setSelectStandard(List<ShopStandardVo> selectStandard) {
        this.selectStandard = selectStandard;
    }

    public void setSelectStandard(Set<ShopStandardVo> selectStandard) {
        if (selectStandard != null) {
            List<ShopStandardVo> vos = new ArrayList<>();
            vos.addAll(selectStandard);
            this.selectStandard = vos;
        } else {
            this.selectStandard.clear();
        }
    }


    public String getStandardIds() {
        return standardIds;
    }

    public void setStandardIds(String standardIds) {
        this.standardIds = standardIds;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }
}

